<?php
$this->beginBlock('toolbar');
$t = $this->toolbar();
echo $t->renderBegin();
echo $t->renderItem($this->linkButton($this->__('system.button.delete'), "deleteGridChecked('grid', '".$this->buildUrl('*/*/*/delete')."')"));
echo $t->renderItem($this->link($this->__('system.button.new'), $this->buildUrl('*/*/*/create')));
echo $t->renderEnd();

$this->nextBlock('grid');
$g = $this->grid('grid', $this->list->toArray());
echo $g->renderBegin();
echo $g->renderHeadBegin();
echo $g->emptyHead()->setStyle('width', '30px');
echo $g->htmlHead($this->checkbox()->addClass('row-all-check')->toHtml())->setStyle('width', '30px');;
echo $g->labelHead($this->__('system.label.code'))->setStyle('width', '150px')->toHtml();
echo $g->labelHead($this->__('system.label.name'))->setStyle('width', '150px')->toHtml();
echo $g->labelHead($this->__('system.label.description'))->toHtml();
echo $g->emptyHead()->setStyle('width', '40px');
echo $g->renderHeadEnd();
while($g->nextRow()):
	echo $g->renderRowBegin();
	echo $g->indexCell()->toHtml();
	echo $g->checkboxCell('{id}', 'ids[]')->addClass('row-check')->toHtml();
	echo $g->labelCell('{code}')->toHtml();
	echo $g->labelCell('{name}')->toHtml();
	echo $g->labelCell('{description}')->toHtml();
	echo $g->linkCell($this->__('system.button.modify'), $this->buildUrl('*/*/*/edit', array('id'=>'{id}')))
			->setStyle('width', 40)
			->setStyle('text-align', 'center')
			->toHtml();
	echo $g->renderRowEnd();
endwhile;
echo $g->renderEnd();

$this->nextBlock('pagination');
echo $this->pagination($this->recordCount)->toHtml();
$this->endBlock();

echo $this->extend('template'.DS.'list');